<!-- HTML5 sekce pro hlavni obsah stranky -->
      <section id="content">
        <?php if($system_settings->photo_newest): ?>
        <div class="block inside">
          <header>             
            <div class="top-right"><a id="thumb-newest-prev" href="javascript:;" title=""><span class="arrow-lt">&lt;</span></a><a id="thumb-newest-next" href="javascript:;" title=""><span class="arrow-gt">&gt;</span></a></div>
            <h2>Nejnovější</h2>                          
          </header>        
          <section class="block-body">
            <div id="thumb-newest" class="slider-one-row thumb-hover">
              <ul>
                <?php foreach ($photo_newest as $item): ?>
                <?php $photo_user_info = ORM::factory('user')->where('username', '=', $item->username)->find(); ?>
                <li>                  
                  <a href="<?php echo url::base() ?>photo/view/<?php echo $item->id ?>" title="">
                    <div class="thumb-info"><p><?php echo $photo_user_info->firstname; ?> <?php echo $photo_user_info->lastname; ?></p><strong><?php echo ucfirst($item->title); ?></strong><span class="thumb-info-bottom"><?php echo Helpers_Photovoice::datum($item->date); ?></span><?php if ($item->photo_source->find_all()->count() > 1): ?><span class="thumb-info-set"></span><?php endif ?><span class="thumb-info-zoom"></span></div>
                    <img src="<?php if ($item->mature_content && !Auth::instance()->logged_in()) { echo 'media/img/mature_content.gif'; } else { echo url::base().'files/users/'.$item->username.'/'.$item->thumb; } ?>" alt="<?php echo $item->username; ?> - <?php echo $item->title; ?>" />
                  </a>
                </li>
                <?php endforeach ?>
              </ul>
            </div>
            <div class="clear-both"></div>                          
          </section>          
        </div>
        <div class="block-bottom"></div>
        <?php endif ?>
        <?php if($system_settings->photo_popular): ?>
        <div class="block inside">
          <header>
            <div class="top-right"><a href="" title=""><span class="arrow-lt">&lt;</span></a><a href="" title=""><span class="arrow-gt">&gt;</span></a></div>
            <h2>Nejpopulárnější</h2>
          </header>
          <section class="block-body">
            <div class="slider-one-row">
              <ul>
                <?php foreach ($photo_newest as $item): ?>
                <li>
                  <img src="<?php echo url::base() ?>files/users/<?php echo $item->username; ?>/<?php echo $item->thumb ?>" alt="<?php echo $item->username; ?> - <?php echo $item->title; ?>" />
                </li>
                <?php endforeach ?>
                <?php foreach ($photo_newest as $item): ?>
                <li>
                  <img src="<?php echo url::base() ?>files/users/<?php echo $item->username; ?>/<?php echo $item->thumb ?>" alt="<?php echo $item->username; ?> - <?php echo $item->title; ?>" />
                </li>
                <?php endforeach ?>
              </ul>
            </div>
            <div class="clear-both"></div>
          </section>
        </div>
        <div class="block-bottom"></div>
        <?php endif ?>
        <?php if($system_settings->articles): ?>
        <div class="block aside">
          <div class="block-left">
            <?php foreach ($articles_new as $item): ?>
            <article class="article">
              <header>
                <h2 class="upper big"><?php echo $item->title ?></h2>
              </header>
              <section>
                <?php if (! empty($item->preview_image)): ?>
                  <img title="<?php echo $item->title ?>" src="<?php echo url::base() ?>files/articles/<?php echo $item->date ?>.jpg" alt="<?php echo $item->title ?> - Fotografie ke článku" />
                <?php endif ?>
                <p><?php echo preg_replace('/\s+?(\S+)?$/', '', substr(strip_tags($item->text), 0, 400)) ?>&hellip</p>
              </section>
              <div class="article-bottom"><span class="float-left"><img src="<?php echo url::base() ?>media/img/icons/mini_hearth.png" alt="Oblíbený"><strong>13</strong><img src="<?php echo url::base() ?>media/img/icons/mini_bubble.png" alt="Komentářů"><strong>1</strong></span><a href="<?php echo url::base() ?>article/<?php echo $item->id.'-'.$item->seo_title ?>" class="more float-right" title="">číst článek</a></div>
            </article>
            <?php endforeach ?>
            <div class="clear-both"></div>
            <div class="arrows-bottom float-right"><a href="<?php echo url::base() ?>articles" class="button-dark" title="">Číst všechny články</a></div>
          </div>
          <aside class="block-right">
            <h3>Nové komentáře</h3>
            <div class="padding-aside">
              <?php foreach ($comments_new as $item): ?>
              <div class="comment-mini"><a href="<?php echo url::base() ?>photo/view/<?php echo $item->photo_user_id ?>" title=""><?php echo substr(ucfirst(mb_strtolower($item->text)), 0, 28); if(strlen($item->text) > 28) { echo '&hellip;'; } ?></a></div>
              <div class="comment-mini-bottom"><?php echo $item->username; ?></div>
              <?php endforeach ?>
            </div>
            <h3 class="min">Příspěvky blogy</h3>
            <div class="padding-aside">
              <?php foreach ($blogs_new as $item): ?>
              <div class="item-line"><h4><a href="<?php echo url::base() ?>blog/<?php echo $item->id.'-'.$item->seo_title ?>" title=""><?php echo $item->title; ?></a></h4><p><?php echo substr(ucfirst($item->text), 0, 180); if(strlen(mb_strtolower($item->text)) > 180) { echo '&hellip;'; } ?><span class="clear-right"></span></p></div>
              <?php endforeach ?>
            </div>
          </aside>  
          <div class="block-bottom aside-bottom"></div>                     
        </div>
        <?php endif ?>
      </section>